package at.xne.dojosui

import grails.converters.JSON
import grails.converters.XML

class AnimalController {

    def index = { }
	def listJSON = {
		println "listJSON"
		if (!params.max) params.max = 10
		def json = [identifier:"id", label:"animals", items:Animal.list(params)]
        render json as JSON
	}
	def listXML = {
		println "listXML"
		if (!params.max) params.max = 10
		def xml = [identifier:"id", label:"animals", items:Animal.list(params)]
		render xml as XML
	}
}
